<template>
	<div class="application-center">
		<SearchHeader
			@changeComponent="changeComponent"
			@search="search"
			:jumpToPath="'AppSearch'"
			:returnTo="'AppList'"
			:placeholder=" $t('pages.application.placeholder', '请输入应用名称')"
		/>
		<div class="application-center-content">
			<component
				:is="component"
				:SearchList="SearchList"
				:searching="searching"
				:searchKeyWord="searchKeyWord"
			></component>
		</div>
	</div>
</template>
<script setup lang="ts">
import SearchHeader from '@/entry_mobile/components/SearchHeader/index.vue'
import useAppCenter from './hooks/useAppCenter'
// import { t } from '@/entry_mobile/locales/index'
import { i18n } from '@/locales'
const { $t } = i18n
const {
	component,
	SearchList,
	changeComponent,
	search,
	searching,
	searchKeyWord,
} = useAppCenter()
</script>
<style lang="less" scoped>
.application-center {
	height: calc(100vh - 51px);
	&-content {
		height: calc(100% - 59px);
		margin-top: 8px;
		padding: 0 8px;
		position: relative;
	}
}
</style>
